// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   PropertiesLoader.java

package com.ronglian.register_mini_program.common;

import java.io.*;
import java.net.*;
import java.util.Properties;
import java.util.logging.Logger;

public class PropertiesLoader {
    private static Logger logger = Logger.getLogger("PropertiesLoader");

    public PropertiesLoader() {
    }

    public static Properties loadProperties(String filePath) {
        Properties props = null;
        if (filePath != null && !filePath.equals("")) {
            props = new Properties();
            FileInputStream is = null;

            Properties var5;
            try {
                String path = PropertiesLoader.class.getClassLoader().getResource("").toURI().getPath();
                path = URLDecoder.decode(path, "UTF-8") + filePath;
                File file = new File(path);
                if (file.exists()) {
                    is = new FileInputStream(file);
                    props.load(is);
                    return props;
                }

                logger.warning("that properties file is not found");
                var5 = props;
            } catch (FileNotFoundException var20) {
                logger.warning("that properties file is not found");
                var20.printStackTrace();
                return props;
            } catch (IOException var21) {
                logger.warning("that properties file was loading error");
                var21.printStackTrace();
                return props;
            } catch (URISyntaxException var22) {
                var22.printStackTrace();
                return props;
            } finally {
                try {
                    is.close();
                } catch (IOException var19) {
                    logger.warning("that fileInputStream of properties was closeing error");
                    var19.printStackTrace();
                }

            }

            return var5;
        } else {
            logger.warning("that path of properties file is null");
            return props;
        }
    }

}
